import React, { useEffect } from 'react';
import { Route, Switch, HashRouter as Router } from 'react-router-dom';
import routes from './router';
import 'antd/dist/antd.css';
function App() {
  // useEffect(() => {
  //   if (window.location.hash === '#/') {
  //     getItem();
  //     return;
  //   }
  // }, [1])
  return (
    <div className="App">
     <Router>
     
        <Switch>
          {routes.map(route => <Route key={route.path} path={route.path} exact={route.exact} component={route.render} />)}
        </Switch>
     
    </Router>
    </div>
  );
}

export default App;
